#-------------------------------------------------
#
# Project created by QtCreator 2023-06-08T11:37:31
#
#-------------------------------------------------

QT       -= gui

TARGET = libHGCamera
TEMPLATE = lib

DEFINES += DEVICECARDLL_HN_LIBRARY
DEFINES += __SHARE_EXPORT
DEFINES += PARSE_VEIHCLE
DEFINES += SAVE_VIDEO
DEFINES += SAVE_MP4
DEFINES += PLAY_VIDEO
DEFINES += USE_TURBO_JPEG

INCLUDEPATH += $$PWD/Plugins
INCLUDEPATH += $$PWD/libjpeg-turbo/include

SOURCES += libHGCamera.cpp \
    cameraModule/BaseCamera.cpp \
    cameraModule/Camera6467_plate.cpp \
    cameraModule/Camera6467_VFR.cpp \
    cameraModule/CameraResult.cpp \
    cameraModule/ResultListManager.cpp \
    common/cconfigurer.cpp \
    common/clogerInstance.cpp \
    libVideoSaver/CusH264Struct.cpp \
    libVideoSaver/MyH264Saver.cpp \
    libVideoSaver/MyH264Vector.cpp \
    Plugins/customFuncHelper/cCustomFuncHelper.cpp \
    Plugins/customFuncHelper/cDequeLikeUnorderSet.cpp \
    Plugins/dirHelper/cDirHelper.cpp \
    Plugins/logHelper/cLoggerInterface.cpp \
    Plugins/netHelper/cNetHelper.cpp \
    Plugins/plateHelper/cPlateHelper.cpp \
    Plugins/stringHelper/cStringHelper.cpp \
    Plugins/threadHelper/cThreadHelper.cpp \
    Plugins/timeHelper/cTimeHelper.cpp \
    Plugins/initReader/ConvertUTF.c \
    cameraModule/DeviceListManager.cpp \
    libH264/cVideoPlayer.cpp \
    Plugins/cJSON/cJSON.c \
    Plugins/imageHelper/cimagehelper.cpp

HEADERS += libHGCamera.h\
        libHGCamera_global.h \
    cameraModule/BaseCamera.h \
    cameraModule/Camera6467_plate.h \
    cameraModule/Camera6467_VFR.h \
    cameraModule/CameraResult.h \
    cameraModule/ResultListManager.h \
    cameraModule/ThreadSafeList.h \
    common/cconfigerinstance.h \
    common/cconfigurer.h \
    common/clogerInstance.h \
    common/commonDefFun.h \
    libVideoSaver/CusH264Struct.h \
    libVideoSaver/libvideo_saver_ff.h \
    libVideoSaver/MyH264Saver.h \
    libVideoSaver/MyH264Vector.h \
    Plugins/customFuncHelper/cCustomFuncHelper.h \
    Plugins/customFuncHelper/cDequeLikeUnorderSet.h \
    Plugins/deleterHelper/cAutoDeleter.h \
    Plugins/dirHelper/cDirHelper.h \
    Plugins/initReader/ConvertUTF.h \
    Plugins/initReader/SimpleIni.h \
    Plugins/logHelper/cLoggerInterface.h \
    Plugins/logHelper/DllExport.h \
    Plugins/logHelper/log4z.h \
    Plugins/netHelper/cNetHelper.h \
    Plugins/plateHelper/cPlateHelper.h \
    Plugins/stringHelper/cStringHelper.h \
    Plugins/threadHelper/cThreadHelper.h \
    Plugins/timeHelper/cTimeHelper.h \
    cameraModule/DeviceListManager.h \
    libH264/cVideoPlayer.h \
    Plugins/cJSON/cJSON.h \
    Plugins/imageHelper/cimagehelper.h

unix {
    target.path = /usr/lib
    INSTALLS += target
}


windows{
#    QMAKE_LFLAGS += -Wl,--kill-at
#    QMAKE_LFLAGS += -Wl,--output-def,libHGCamera.def
#    QMAKE_LFLAGS += /DEF:"libHGCamera.def"
    QMAKE_LFLAGS += -Wl,--add-stdcall-alias

#    QMAKE_LFLAGS_RELEASE += /MAP
#    QMAKE_CFLAGS_RELEASE += /Zi
#    QMAKE_LFLAGS_RELEASE += /debug /opt:ref
#    QMAKE_LFLAGS += "/DEF:E:\Github\hunan-plate_video\20230605_HuNanXinKeVFR\sourceCode\libHGCamera\libHGCamera.def"
#    QMAKE_LFLAGS += /Gd

    LIBS += -L$$PWD/libHvDevice_win/ -lHvDevice
    LIBS += -L$$PWD/libVideoSaver/ -llibvideo_saver_ff_msvc
    LIBS += -L$$PWD/libH264/lib
    LIBS += -L$$PWD/libjpeg-turbo/lib

    LIBS += -lWs2_32
    LIBS += -lVersion
    LIBS += -lUser32
    LIBS += -lH264
    LIBS += -lturbojpeg

    RC_FILE +=  rc.rc
}

DISTFILES += \
    makefile

